<div class="header-banner">
<h1>
	<?php __('Articles');?>
	<div class="add-new-item">
		<?php echo $this->Html->link($this->Html->image('assets/icons/dashboard/95.png', array('alt' => 'Edit')),
									'/admin/'.$this->params['controller']. '/' .'add',  
									array('escape' => false, 'class'=>'tooltip table_icon', 'title' => __('Add New Articles',true)));
	?>
    </div>
</h1>
	<p><?php __('Edit, View and Delete Pages.'); ?></p>
    </div>
<div class="articles index">
	<table class = "normal">
	<thead>
		<tr>
				<th><?php __('Category');?></th>
				<th><?php __('Title');?></th>
				<th><?php __('User');?></th>
				<th><?php __('Published');?></th>
				<th><?php __('Homepage');?></th>
				<th class="actions"><?php __('Actions');?></th>
		</tr>
	</thead>
	<tbody>
	<?php
	$i = 0;
	foreach ($articles as $article):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?> id="row<?php echo $article['Article']['id']; ?>">
		<td>
			<?php echo $this->Html->link($article['Category']['name'], array('controller' => 'categories', 'action' => 'view', $article['Category']['id'])); ?>
		</td>
		<td><?php echo $article['Article']['title']; ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($article['User']['name'], array('controller' => 'users', 'action' => 'view', $article['User']['id'])); ?>
		</td>
		<td><?php echo $article['Article']['published']; ?>&nbsp;</td>
		<td><?php echo $article['Article']['homepage']; ?>&nbsp;</td>
		<td><?php echo $article['Article']['hits']; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link($this->Html->image('assets/icons/actions_small/Pencil.png', array('alt' => 'Edit')),
											'/admin/'.$this->params['controller']. '/' .'edit/' . $article['Article']['id'],  
											array('escape' => false, 'class'=>'tooltip table_icon'));
			?>
			<?php echo $this->Html->link($this->Html->image('assets/icons/actions_small/Trash.png', array('alt' => 'Delete')),
											'/admin/'.$this->params['controller']. '/' .'delete'.'/'.$article['Article']['id'],  
											array('rel' => 'delete', 'escape' => false, 'class'=>'tooltip table_icon'));
			?>
		</td>
	</tr>
<?php endforeach; ?>
</tbody>
	</table>